<?php

require "web.config.php";
 
 class listController
 {


  //----------------后台
 //--------------------------------栏目    
public function column($param){   
global $m;
   $output = show("sale_code",-1,'id','asc');
   include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');//加载视图
    }     
    
    
function columnadd($param){    
global $m;
   $output = show("sale_code",$param);
 include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');//加载视图
     }
     
     
function columnupdate(){
	global $m;
$dt = $_POST['data'];

$id = $_POST['id'];
if(empty($id))
$dt['time']=getTime(TIMESTAMP);
$myValue =update("sale_code",$dt,$id,("homepage/list/column/"));
}
//删除
function columndel($id){    
global $m;
$myValue =del("sale_code",$id,SplitUrl("homepage/list/column/"));
}  
    
     //富文本上传组件
        function columnEditUp($name){         	
global $m;
$myValue =upload_file($name,0,1);  
   }


  //单文件上传组件
        function columnUp($name){         	
global $m;
$myValue =upload_file($name);  
   }


 //--------------------------------留言板

public function message($param){   
global $m;
   $output = show("message",-1,"time",'desc');
 include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');//加载视图
    }    
  //--------------------------------链接 

public function link($param){   
global $m;
   $output = show("home_link",-1);
   
    include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');//加载视图
    }     
    
    
function linkadd($param){    
global $m;
   $output= show("home_link",$param);  include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');
     }
     
     
function linkupdate(){
	
	global $m;
$dt = $_POST['data'];
$id = $_POST['id'];

$myValue =update("home_link",$dt,$id,("homepage/column/link/"));
}

//删除
           function linkdel($id){    
global $m;
$myValue =del("home_link",$id,SplitUrl("homepage/column/link/"));
}  




  //--------------------------------音乐 

public function music($param){  
	
	 global $m;
   $output = show("home_music",-1);
  include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');//加载视图
    }     
    
    
function musicadd($param){    
global $m;

   $output = $param!=0?show("home_music",$param):"";
     include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');//加载视图
     }
     
     
function musicupdate(){
	
	global $m;
$dt = $_POST['data'];
$id = $_POST['id'];

$myValue =update("home_music",$dt,$id,("homepage/column/music/"));
}

//删除
           function musicdel($id){    
global $m;
$myValue =del("home_music",$id,SplitUrl("homepage/column/music/"));
}  

  //上传组件
         function MusicUp($name){         	
global $m;
$myValue =upload_file($name);  
   }

  //--------------------------------布局     
function layout($param=1){    
global $m;
$output = show("home_layout",$param);  
 include view(__ROOT__,str_replace('Controller','',__CLASS__),__FUNCTION__,'backShare');//加载视图
     }
    
function layoutupdate(){
	
	global $m;
$dt = $_POST['data'];
$id = $_POST['id'];

$myValue =update("home_layout",$dt,$id,("homepage/column/layout/1"));
}

        //上传组件
        //主页背景图
         function layoutPicUp($name){         	
global $m;
$myValue =upload_file($name,"1920*1280");  
   }
     
    
   
   
     
     
 }
  
 
?>